package cn.com.cifi.mars.web.action.sys;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.alibaba.fastjson.JSONArray;

import cn.com.cifi.mars.bean.vo.sys.req.SaveSysRoleOrgDataPermissionReqParam;
import cn.com.cifi.mars.bean.vo.sys.req.SaveSysRolePermissionReqParam;
import cn.com.cifi.mars.bean.vo.sys.rsp.RolePermissionVo;
import cn.com.cifi.mars.common.bean.R;
import cn.com.cifi.mars.common.constants.VersionConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@Api(tags = {"系统管理"})
@RequestMapping("/${spring.data.rest.base-path}/{apiVersion}/sys/sysRolePermission")
public interface ISysRolePermissionController {

	@ApiOperation(value = "角色管理-添加角色功能权限", notes = "角色管理-添加角色功能权限")
	@PostMapping(value = "")
	public R<String> createSysRolePermission(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@RequestBody SaveSysRolePermissionReqParam param);

	@ApiOperation(value = "角色管理-显示角色功能权限树", notes = "角色管理-显示角色功能权限树")
	@GetMapping(value = "tree")
	public R<RolePermissionVo> getSysRolePermissionTree(
			@ApiParam(value = "接口版本", required = true, defaultValue = VersionConstant.V1) @PathVariable(value = "apiVersion") String apiVersion,
			@ApiParam(value = "角色id", required = true) @RequestParam(name = "roleId") String roleId);

}
